//
//  ZLIndexPath.m
//  ZLPullMenu
//
//  Created by 赵振磊 on 2024/5/28.
//

#import "ZLIndexPath.h"

@implementation ZLIndexPath
+ (instancetype)indexPath:(NSInteger)menuIndex groupIndex:(NSInteger)groupIndex optionIndex:(NSInteger)optionIndex {
    ZLIndexPath *indexPath = [[ZLIndexPath alloc] init];
    indexPath.menuIndex = menuIndex;
    indexPath.groupIndex = groupIndex;
    indexPath.optionIndex = optionIndex;
    return indexPath;
}

- (BOOL)isEqual:(id)object {
    if (![object isKindOfClass:[ZLIndexPath class]]) {
        return NO;
    }
    ZLIndexPath *index = (ZLIndexPath *)object;
    return (self.menuIndex == index.menuIndex && self.groupIndex == index.groupIndex && self.optionIndex == index.optionIndex);
}

@end
